Copyright  2016 HID Global Corporation/ASSA ABLOY AB. All rights reserved.

===================================
HID Global PKCS #11 API Java sample
===================================

This sample demonstrates how to use the PKCS API version 2.20 provided with ActivID ActivClient 7.1 from a Java program.
It implements the following scenarios:
-	How to use a signature key to sign data.
-	How to log on to the card.
-	How to write a secret key on the card, use it to encrypt or decrypt some data and then delete it.
-	How to generate an OTP.

		----------------------------------------------------

1 - Required runtime environment

	- Microsoft Windows 7 SP1 or later (32 and 64-bit editions)
	- ActivID ActivClient 7.1
	- Oracle Java Runtime Environment 1.7 or later

		----------------------------------------------------

2 - Recommended development environment

	- Oracle Java Development Kit 1.7 or later

	Sample sources are located in the SDK\PKCS #11\Java\Sample folder.

	Add the ActivClient 7.1 installation directory to the CLASSPATH environment variable (for example: set CLASSPATH=%CLASSPATH%;C:\Program Files\HID Global\ActivClient\).
	
	The Java sample is provided together with two batch files. Simply copy the SDK\PKCS #11\Java\Sample folder from the ActivClient distribution CD to a hard disk location, and open a command prompt at that location.
	
	First, run 'pkcs.javasample_compilation.bat' to produce the  .\Binaries\pkcs.javasample.jar file.
	Then, run 'pkcs.javasample_execution.bat' to run the sample.

		----------------------------------------------------

3 - Sample description

	You must be familiar with the PKCS #11 specifications to use this sample.
	
	This Java applet relies on acpkcs211.dll implementing the PKCS #11 API and on a Java Native Interface (for example, iaikPkcs11Wrapper.jar installed with Oracle Java).
	
	It demonstrates the following PKCS #11 functions: 
C_GetInfo, 
C_Initialize (through the constructor of the JNI wrapper), 
C_GetFunctionList (through the constructor of the JNI wrapper), 
C_GetSlotList, 
C_GetSlotInfo, 
C_GetTokenInfo, 
C_OpenSession, 
C_CloseSession, 
C_FindObjectsInit, 
C_FindObjects, 
C_FindObjectsFinal, 
C_GetAttributeValue, 
C_Login,
C_Logout, 
C_SignInit, 
C_Sign, 
C_EncryptInit,
C_Encrypt, 
C_DecryptInit, 
C_Decrypt, 
C_VerifyInit, 
C_Verify, 
C_SetPIN, 
C_CreateObject, 
C_DestroyObject